home *** CD-ROM | disk | FTP | other *** search
/ Graphics Plus / Graphics Plus.iso / amiga / opalvisn / opalbatc.lha / OpalStoryBoard.Rexx < prev    next >
Encoding:
OS/2 REXX Batch file  |  1993-03-13  |  3.9 KB  |  153 lines

  1. /* 
  2.                               OpalStoryBoard
  3.                                By J.L. White
  4.                           ⌐1993 Merlin's Software
  5.  
  6.   This Arexx script will allow you to create a Story Board of your
  7. animation frames. The script will take from 1 to 30 frames and create
  8. a page with up to 30 mini pics of your animation along with the frame
  9. numbers. This script was originally created for use with Transporter SFC
  10. software but has been adapted to run as a script directly in OpalPaint
  11. through the Arexx function keys. Just set the path in the Arexx control
  12. panel for this file.
  13.   OpalStoryBoard requires that you pass it the first frame in the series,
  14. the name to save the Story Board screen and how many files to convert.
  15. For example, you have 30 frames of an animation called TEST with the 
  16. frames named from TEST001 to TEST030. Enter in TEST001 when it ask for
  17. the filename. Then it will ask for a name to save the Story Board to,
  18. which could be something like DH1:AnimStory. Next it will ask you how many
  19. frames to convert where you would enter 30 for this example. You can select
  20. the color of the background screen and also the border and text colors.
  21.   I have been busy adding many new OpalVision features to Transporter. 
  22. Version 1.1 allows users of OpalVision to single frame there animations
  23. to Video with most of the popular SFC cards out there. 1.2 will have alot
  24. more Opal support through out the program, like frame grabbing, slide shows,
  25. and Picture In Picture options. If you would like more information on 
  26. Transporter you can contact me at the address below.
  27.  
  28. Jeff White
  29. 809 W. Hollywood St.
  30. Tampa, Fl. 33604
  31. (813) 977-6511
  32.   
  33. */
  34.  
  35. address "OpalPaint_Rexx"
  36. options Results
  37.  
  38. call GetInName
  39. call GetOutName
  40. call GetTotal
  41. call Story
  42. Okay "Arexx Script Is Complete!"
  43. exit
  44.  
  45.  
  46. Story:
  47.     do FrameNum = 1+AddNum to TotalFiles+AddNum
  48.         if FrameNum = 1+AddNum then do
  49.             SaveSetUp
  50.             StoryX = 28
  51.             StoryY = 29
  52.             AddPage 640 400 HIRES INTERLACE
  53.             Key "j"
  54.             Okay "Select Background Color Then Click Ok!"
  55.             SolidRect 0 0 640 400
  56.             Okay "Select Border & Text Color Then Click Ok!"
  57.             ActivePot
  58.             TextColor = Result
  59.             Key "j"
  60.             end
  61.         Load InPic""right(FrameNum,3,'0')
  62.              if RC = 10 then do
  63.             Okay "Arexx Script Aborted!"
  64.             exit
  65.             end
  66.         ActiveBrush 1
  67.         PageSize
  68.         Parse var Result Width Height
  69.         RectCut 0 0 Width Height
  70.         RescaleMethod Smooth2
  71.         Resize 83 52
  72.         Key "j"
  73.         ActivePot TextColor
  74.         if FrameNum = 1+AddNum then do
  75.             Text = "Story Board For "OutPic" With Frames #"right(1+AddNum,3,'0')" - #"right(TotalFiles+AddNum,3,'0')
  76.             Len = ((78-(Length(Text)))/2) * 8
  77.             ActiveBrush 2
  78.             MakeText 'topaz 8 2 'Text
  79.             Handle 0 0
  80.             PutBrush Len 10
  81.             end
  82.         SolidRect StoryX-2 StoryY-2 StoryX+83 StoryY+52
  83.         ActiveBrush 1
  84.         ColorSource MULTICOLOR
  85.         Handle 0 0
  86.         PutBrush StoryX StoryY
  87.         ActiveBrush 2
  88.         Handle 0 0
  89.         MakeText 'topaz 8 2 Frame #'right(FrameNum,3,'0')
  90.         PutBrush StoryX+38 StoryY+61
  91.         Key "j"
  92.         StoryX = StoryX + 100
  93.         if FrameNum = 6+AddNum then do
  94.             StoryX = 28 
  95.             StoryY = StoryY + 74
  96.             end
  97.         if FrameNum = 12+AddNum  then do
  98.             StoryX = 28 
  99.             StoryY = StoryY + 74
  100.             end
  101.         if FrameNum = 18+AddNum  then do
  102.             StoryX = 28 
  103.             StoryY = StoryY + 74
  104.             end
  105.         if FrameNum = 24+AddNum  then do
  106.             StoryX = 28 
  107.             StoryY = StoryY + 74
  108.             end
  109.         if FrameNum = TotalFiles+AddNum then do
  110.             Key "j"
  111.             Save OutPic
  112.             RestoreSetUp
  113.             end
  114.         end
  115. return
  116.  
  117.  
  118.  
  119. GetInName:
  120.     AskFileName "Enter Name Of First Frame" "dh2:pics" ""
  121.     if RC = 5 then do
  122.         Okay "Arexx Script Aborted!"
  123.         exit
  124.         end
  125.     AddNum = right(Result,3)
  126.     Length = wordlength(Result,1)
  127.     InPic = left(Result,Length-3)
  128.         AddNum = AddNum - 1
  129. return
  130.  
  131.  
  132.  
  133. GetOutName:
  134.     AskFileName "Enter Name For Saving Frames" "OpalPaint:Images" ""
  135.     if RC = 5 then do
  136.         Okay "Arexx Script Aborted!"
  137.         exit
  138.         end
  139.     OutPic = Result
  140. return
  141.  
  142.  
  143.  
  144. GetTotal:
  145.     AskProp 1 30 29 "Enter Total Number Of Frames (1-30)!"
  146.     if RC = 5  then do
  147.         Okay "Arexx Script Aborted!"
  148.         exit
  149.         end
  150.     TotalFiles = Result
  151. return
  152.  
  153.